<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%
String path = request.getContextPath();
%>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic" %>
<html:html locale="true">
<head>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<title></title>
<link href="console.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style1 {font-size: 16px}
-->
.even {
	background:	#eee;
}

.odd {

}
</style>
</head>

<body>
<jsp:include page="/title.jsp" flush="true"/>
	<p class="lnkhead2"><bean:message key="menu.orgManagers"/>&gt;<bean:write name="domain"  filter="true"/>&gt;<bean:message key="org.emplyNumber"/><bean:write name='userNumber'/></p>
		<table width="80%" border="0" cellpadding="0"  cellspacing="0">
		
		<tr  class="txtnormal2">
			
			<form action="org.do?act=userlist" method="post" name="form_query">
			<td width="30%"><bean:message key="org.userId"/>
				
				<input type="text" name="userId" size=16  value="<bean:write name='userId'/>" />
				
			</td>
				<td  width="40%"><bean:message key="org.userName"/>
				
				<input type="text" name="userName" size=16 value="<bean:write name='userName'/>" />
				
			</td>
			
			<td>
			<input  type="submit" name="Submit" value='<bean:message key="button.query"/>' >
			</td>
				<td />
			
			<input type="hidden" name="pageup" value="<bean:write name='pageup'/>"/>
			
			<input type="hidden" name="begin"  value="0"/>
			
			<input type="hidden" name="length" value="15"/>
			<input type="hidden" name="id"/>
			<input type="hidden" name="domain" value="<bean:write name='domain'/>"/>
			<input type="hidden" name="pagedown" value="<bean:write name='pagedown'/>"/>
				
	</tr>
	
</table>
	<form name="form" method="post" action="org.do">
	<input type="hidden" name="act"/>
	<input type="hidden" name="domain" value="<bean:write name='domain'/>"/>
		<input type="hidden" name="pageup" value="<bean:write name='pageup'/>"/>			
			<input type="hidden" name="begin"  value="0"/>		
			<input type="hidden" name="length" value="15"/>
			<input type="hidden" name="pagedown" value="<bean:write name='pagedown'/>"/>
	<table width="98%" border="0" cellpadding="1" class="sort-table" id="table-1" cellspacing="0">
	
	<thead>
			
			<tr >
				<td align="center" width="3%">				
&nbsp;					
				</td>
				
					<td align="center" width="10%">
					
					<bean:message key="org.userId"/>
					
				</td>
				<td align="center" width="10%">
					
					<bean:message key="org.userName"/>
					
				</td>
				
			
				<td align="center" width="15%">
					
					<bean:message key="org.email"/>
					
				</td>
				
				<td align="center" width="10%">
					
					<bean:message key="org.tel"/>
					
				</td>
				
				<td align="center" width="10%">
					
					<bean:message key="org.mobile"/>
					
				</td>
				<td align="center" width="6%">
					<bean:message key="org.attr1"/>
				</td>
			<td align="center" width="6%">
					<bean:message key="org.attr2"/>
				</td>
				<td align="center" width="6%">
					<bean:message key="org.attr3"/>
				</td>
				<td align="center" width="6%">
					<bean:message key="org.attr4"/>
				</td>
				<td align="center" width="6%">
					<bean:message key="org.attr5"/>
				</td>
			</tr>
				
	  </thead>
			<tbody>
			<% int i=0; String color;String check="";%>
			
			<logic:iterate id="user" name="userlist">
				
				<% i++; if(i%2==1) color="odd"; else color="even"; if(i==1) check="checked"; else check="";%>
				
				<tr  class="<%=color%>">
					<td align="center">
					<input type="radio" <%=check%> name="userid"  value="<bean:write name='user' property='id'/>" />
								
					</td>
				<td align="left">
						<bean:write name="user" property="id" filter="true"/>
					</td>
					<td align="left">
						<bean:write name="user" property="name" filter="true"/>					
					</td>
					
					
					
					<td align="center">
						
						<bean:write name="user" property="email" filter="true"/>
						
					</td>
					<td align="center">
						
						<bean:write  name="user" property="tel"/>
						
					</td>
					
					<td align="center">
						
						<bean:write name="user" property="mobile" filter="true"/>
						
					</td>
					<td align="center">
						<bean:write name="user" property="attr1"/>
					</td>
						<td align="center">
						<bean:write name="user" property="attr2"/>
					</td>
						<td align="center">
						<bean:write name="user" property="attr3"/>
					</td>
						<td align="center">
						<bean:write name="user" property="attr4"/>
					</td>
						<td align="center">
						<bean:write name="user" property="attr5"/>
					</td>
				</tr>
			
			</logic:iterate>
	  </tbody>
</table>
	<table width="97%">		
			<tr >
				
				<td align="right">
					
				<logic:greaterEqual name="pageup" value="0">
						
						<a class="lnksub1" href="javascript:pageup()">
					
					<bean:message key="button.pageup"/>
					
				</a>
				
			</logic:greaterEqual>
			
			<logic:notEqual name="pagedown" value="0">
				
				<a class="lnksub1" href="javascript:pagedown()">
					
					<bean:message key="button.pagedown"/>
					
				</a>
						
					</logic:notEqual></td>
				
			</tr>
			</table>
			<logic:equal name="readonly" value="false">
			<table width="100%">
				<tr class="txtnormal2">
	  <td width="100%" valign="middle" height="43"><input  type="button" name="Submit" value='<bean:message key="button.add"/>' onclick="javascript:shift_visibility(adduser_form)">
	  <input  type="button" name="Submit" value="<bean:message key='button.update'/>" onclick="javascript:modify()">
	  <input type="button" name="Submit2" value="<bean:message key='org.clearPassword'/>" onclick="javascript:clearPassword()">
	  <input type="button" name="Submit3" value="<bean:message key='button.delete'/>" onclick="javascript:del()">
	  <input  type="button" name="query_user_group" value='<bean:message key="org.queryGroupUserIn"/>' onclick="javascript:queryUserGroup()">
			</td>
	</tr>
	</table>
	</logic:equal>
	</form>
	
	<div id="adduser_form"  style="visibility:hidden; z-index:2" >
		
		<table width="97%" border="0" cellpadding="0"  cellspacing="0">
			<form action="org.do?" method="post" name="adduserform">		
			<input type="hidden" name="domain" value="<bean:write name='domain'/>"/>
		<tr  class="txtnormal2">			

			<td align="right"><bean:message key="org.userId"/>
				
				<input type="text" name="userId"  size="12" maxlength="24"/>
				
			</td>
				<td align="right"><bean:message key="org.userName"/>
				
				<input type="text" name="userName"   size="12" maxlength="24"/>
				
			</td>
			
			<td>email
				
				<input type="text" name="email"   size="16" maxlength="36"/>
				</td>
				<td align="right"><bean:message key="org.tel"/>
				
				<input type="text" name="tel"  size="16" maxlength="24"/>
				
			</td>
			</tr>
			<tr  class="txtnormal2">
			
				<td align="right"><bean:message key="org.mobile"/>
				
				<input type="text" name="mobile"  size="16" maxlength="24"/>
				
			</td>
			
			<td align="right"><bean:message key="org.attr1"/>
			<input type="text" name="attr1"  size="12" maxlength="36"/></td>
			<td><bean:message key="org.attr2"/>
			<input type="text" name="attr2"  size="12" maxlength="36"/></td>
			<td  align="right"><bean:message key="org.attr3"/>
			<input type="text" name="attr3"  size="12" maxlength="36"/></td>
	</tr>
			<tr  class="txtnormal2">
			<td align="right" ><bean:message key="org.attr4"/>
			<input type="text" name="attr4"  size="12" maxlength="36"/></td>
			<td align="right"><bean:message key="org.attr5"/>
			<input type="text" name="attr5"  size="12" maxlength="36"/></td>
			<td></td>
			<td>
			<input  type="button" name="Submit" value="<bean:message key='button.ok'/>" onclick="javascript:addUser()">
			</td>
			<input type="hidden" name="act" value="addUser"/>
	</tr>
</table>
	</div>
	<logic:notEmpty name="returnMsg">
	<script>
	
	alert('<bean:write name="returnMsg"/>');
	</script>
	</logic:notEmpty>
	
			<script type="text/javascript">
var st = new SortableTable(document.getElementById("table-1"),
	["None", "String","String",  "String", "String","String","None","None","None","None","None"]);
	function queryUserGroup(){
	var frm = document.forms["form"];
	var userid=(selectedRadiobox(frm,"userid"));
	frm.elements["act"].value="queryUserGroup";
	frm.submit();
	}
 function del(){
	var frm = document.forms["form"];
	var userid=(selectedRadiobox(frm,"userid"));
	if( !confirm("<bean:message key='button.confirmDelete'/>"+"<bean:message key="org.userId"/>:"+userid)) return;
	frm.elements["act"].value="deleteUser";
	frm.submit();
	 };
	 
	 	function clearPassword()
	{
	var frm = document.forms["form"];
	var userid=(selectedRadiobox(frm,"userid"));
	if( !confirm("<bean:message key="org.confirmClearPassword"/>"+"<bean:message key="org.userId"/>:"+userid+"?")) return;
	frm.elements["act"].value="clearPassword";
	frm.submit();
	};
	
	function modify()
	{
	var frm = document.forms["form"];
	frm.elements["act"].value="updateUserInfo";
	frm.submit();
	};
	

	 function update(){
	 shift_visibility(adduser_form);
	 
	 }
	 
	 function shift_visibility(image1){
 if(image1.style.visibility == "visible")
  image1.style.visibility = "hidden";
  else  image1.style.visibility = "visible";
};

function addUser()
	{
	var frm = document.forms["adduserform"];
	//if(checkId(frm.elements["userId"],"ÓÃ»§ID")==false)
	if(frm.elements["userId"].value=="")
		{ 
		alert("<bean:message key="org.needUserId"/>");
		return;
		}
	if(frm.elements["userName"].value=="")
	{ alert("<bean:message key='org.needUserName'/>");
		return;
	}
	frm.submit();
	};
	
	function pagedown()
	{
	var frm = document.forms["form"];
	frm.elements["begin"].value=frm.elements["pagedown"].value;
	frm.elements["act"].value="userlist";
	frm.submit();
	}
	
	function pageup()
	{
	var frm = document.forms["form"];
	frm.elements["begin"].value=frm.elements["pageup"].value;
	frm.elements["act"].value="userlist";
	frm.submit();
	}
</script>

	
<%@ include file="/table_bottom.jsp" %>
</body>
</html:html>



